home *** CD-ROM | disk | FTP | other *** search
- =head1 NAME
-
- SVGATextCalc - SVGATextMode mode calculator
-
- =head1 SYNOPSIS
-
- B<SVGATextCalc>
- B<MODE>
- [B<--font=fontsize>]
- [B<--trick9>]
- [B<--verbose>]
- [B<--vsf=vertical scanning frequency>]
- [B<--dot=Dot clockfrequency (Mhz)>]
- [B<--hmargin=horizontal margin factor>]
- [B<--vmargin=vertical margin factor>]
-
- =head1 DESCRIPTION
-
- SVGATextCalc takes command line arguments and generates "Modelines" suitable for
- SVGATextMode. User supplied arguments are in high-level, understandable formats,
- like screen width, height, font size, etc. The program will take this
- data and spit out the paraphernalia necessary to (hopefully) program the
- VGA registers (this is a task for F<SVGATextMode(1)>).
-
- SVGATextCalc will do its best to make a video mode matching or as close as
- possible to the video mode requested by the user. Hardware constraints
- (for now, HorizSync and DacSpeed only) will be read from the
- SVGATextMode configuration file F</etc/TextConfig>.
-
- SVGATextCalc will do a purely numerical calculation of the horizontal and
- vertical VGA parameters and frequencies first. Based on these results,
- obvious checks are made (horizontal frequency, dot clock, etc) to see if
- they fall within a range compatible with your hardware. SVGATextCalc will
- try really hard to make the best video mode as possible and has some
- limited intelligence built in (for instance, it will manipulate the dot
- clock frequency if the resulting horizontal frequency falls beyond your
- monitor's capability).
-
- Advanced users can control some subtle aspects of the calculations, such
- as the Dot clock frequency, vertical scanning frequency and some other
- interesting parameters.
-
- =head1 OPTIONS
-
- =over 8
-
- =item B<MODE>
-
- The desired mode. The format is CxR, where C is the number of desired columns and
- R is the number of rows.
-
- =item B<--font=fontsize>
-
- Set the font size to be used. VGA hardware fonts are in the form WxH, where W
- is Width and H is Height (both in pixels). The default font is 8x16 (used in
- the 80x25 mode). Some other common fonts are 8x14, 8x8, etc. See the command
- line option B<--trick9> for a discussion about 9 pixel fonts.
-
- =item B<--trick9>
-
- The VGA hardware has a "trick" that allows 9 pixel wide fonts. In fact, they
- are the very same 8 point fonts with a space added. This mode has the
- advantage of not being so "cluttered" on the screen. If you want this mode,
- specify your normal 8 width fonts and add the B<--trick9> command line
- option. You must choose an 8 pixel font as you would normally, or
- this option will be silently ignored.
-
- =item B<--verbose>
-
- Displays some info to stderr. Nothing else. :)
-
- =item B<--vsf=Vertical scanning frequency (in Hz)>
-
- Set the VSF, also known as vertical refresh rate. The more your monitor can
- handle, the better for your eyes. Reduced rates tend to produce flicker.
- The default is 60Hz.
-
- =item B<--dot=Dotclock frequency (in MHz)>
-
- Use this to force the program to calculate everything based on the given
- Dotclock frequency. Usually, it will be derived from other parameters and
- readjusted if the horizontal scanning frequency falls off limits. If you
- set the frequency with this option, SVGATextCalc will not attempt to change
- it (but you have greater chances of ending with parameters outside the
- limits your monitor can handle).
-
- =item B<--hmargin> and B<--vmargin>
-
- These options control internal aspects of the program. If you have the guts
- to change them, I suppose you have the guts to take a look at the source
- code and discover what you're doing. :)
-
- =head1 ERRORS
-
- The program will make some basic checks against the generated data. Basically,
- it will try to avoid overloading your hardware but, of course, computers do
- what you tell them to do, not what you want them to do.
-
- =head1 EXAMPLES
-
- =item F<SVGATextCalc 90x30>
-
- I love this one. Fits nicely on my 14" monitor. :)
-
- =item F<SVGATextCalc 90x30 --trick9>
-
- Same as above, but (IMO) much better. Fonts don't "stick" together so much.
-
- =item F<SVGATextCalc 100x37 --font 8x14 --vsf=66>
-
- 100 by 37 characters, using an 8x14 font at 66Hz vertical frequency scan.
- If you are out of luck (like me) and have a cheap 14" monitor, you'll notice
- that the resulting VSF is at 63Hz, not 66Hz as requested. In my case, the
- monitor can't handle anything above 35.5Khz (Horizontal scan), so the
- program dropped the dotclock frequency a little, trying to keep the
- resolution. The result was degraded vertical refresh.
-
- =item F<SVGATextCalc 100x37 --font 8x14 --vsf=66 --dot=38>
-
- Same as above, but forcing the dot clock to 38 MHz. Notice it now sticks to
- 66 Hz refresh rates with a 36.76KHz horizontal scan rate. That's why it dropped to
- 63Hz in the previous example (in my case).
-
- =head1 SEE ALSO
-
- F<SVGATextMode(1)>
-
- =head1 WARNINGS
-
- Messing with the VGA registers may damage your hardware. The author (Marco
- Paganini, paganini@ism.com.br) takes B<NO RESPONSIBILITY> for anything
- caused by the use of this program. Every effort has been made to prevent
- very stupid mistakes, but always remember that computers are stupid things
- and there are many ways to fool a program.
-
- Little story:
-
- Some years ago I was sitting on my office desk, bored as always... All
- of a sudden, I remembered a very old monitor we had in spare. The tube
- was tainted, the case broken and the circuitry occasionally failed. The
- repair would cost more than the monitor itself... I thought then: "Hey,
- let's see if this thing can really be burned via software". I grabbed a
- small DOS program that allows you to change the VGA registers and set
- the frequencies to absurd values. All you could see was a vertical line
- in the middle of the screen and a very high pitched noise coming from
- the monitor. The noise was loud, but since the intent was to try to burn
- the monitor, the louder, the better.
-
- I left it at this state for over 24 hours. Nothing happened. I fiddled
- even more with the registers, producing even more obscure results.
- Nothing happened.
-
- From that day on, I decided that it's not so easy to burn a monitor
- via software. But caution is recommended. The monitor in question was a
- Low-end Samsung SyncMaster 3, 35.5Khz/90Hz. I believe that the bigger
- monitors may be more sensible to this kind of attack, so watch
- carefully what you do.
-
- =back
-
- =head1 BUGS
-
- =over 4
-
- =item *
-
- Not exactly a bug, but there's 90% of a chance that you will have to
- use F<vgaset(1)> to tune your video mode. This happens whenever you
- generate a new video mode, since it's almost impossible to predict
- your monitor timings exactly.
-
- =item *
-
- No check is made for the vertical frequency
-
- =item *
-
- Currently, no individual horizontal frequencies are allowed. It means that
- if you use HorizSync A,B,C,D-E,F,G it will only consider the A and F
- frequencies as the lower and upper bounds, respectively.
-
- =item *
-
- No space is allowed between the values in the HorizSync line.
-
- =head1 AUTHOR
-
- B<Marco Paganini>
- B<paganini@ism.com.br>
- B<http://www.ism.com.br/~paganini>
-
- If you use this program and find it of any use, please send me your
- comments and/or suggestions.
-
- =back
-